|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfurny.ga.util.Distance
public final class Distance
Utility class for calculating furniture layout individual distance. The distance is always normalized (in [0;1]).
| Constructor Summary | |
|---|---|
private |
Distance()
Instantiation is not allowed. |
| Method Summary | |
|---|---|
static float |
calcDistance(FurnLayoutIndividual ind1,
FurnLayoutIndividual ind2,
GAContext context)
Deprecated. This old distance calculation was not working well. |
static float |
calcDistance2(FurnLayoutIndividual ind1,
FurnLayoutIndividual ind2,
GAContext context)
Distance calculation for two furniture layouts. |
private static float |
furnEntryDistance(FurnEntry e1,
FurnEntry e2,
GAContext context)
Calculates the distance of two genes (FurnEntrys) in the interval of [0;1]. |
private static float |
leftFurnEntryDistance(FurnEntryList l1,
FurnEntryList l2,
GAContext context)
Left distance calculation of two furniture entry lists. |
private static float |
lowestFurnEntryDistance(FurnEntry entry,
FurnEntryList others,
GAContext context)
Calculates the lowest distance between a furniture entry and a list of other furniture entries. |
static void |
main(java.lang.String[] args)
Main method for testing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
private Distance()
| Method Detail |
|---|
@Deprecated
public static float calcDistance(FurnLayoutIndividual ind1,
FurnLayoutIndividual ind2,
GAContext context)
ind1 - The first individualind2 - The second individualcontext - The GA context
public static float calcDistance2(FurnLayoutIndividual ind1,
FurnLayoutIndividual ind2,
GAContext context)
ind1 - The first individual.ind2 - The second individual.context - The GA context.
private static float leftFurnEntryDistance(FurnEntryList l1,
FurnEntryList l2,
GAContext context)
l1 - The left list.l2 - The right list.context - The GA context.
private static float lowestFurnEntryDistance(FurnEntry entry,
FurnEntryList others,
GAContext context)
entry - The furniture entry.others - The other entries.context - The GA context.
private static float furnEntryDistance(FurnEntry e1,
FurnEntry e2,
GAContext context)
e1 - The first FurnEntrye2 - The second FurnEntrycontext - The ga context
public static void main(java.lang.String[] args)
args - No arguments
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||